<?php

namespace app\admin\model\xmwms\purchase;

use think\Model;

/**
 * Order
 */
class Order extends Model
{
     // 表名
     protected $name = 'wms_purchase_order';

     // 自动写入时间戳字段
     protected $autoWriteTimestamp = true;


     //关联wms_purchase_order_detail 用product_id
     public function detail()
     {
          return $this->hasMany(Detail::class, 'order_product_no', 'purchase_no');
     }
}
